
<%template _header%>
<script type="text/javascript" src="/support/alpha/Js/mootools.js"></script>
<%namespace YouHP.Model%>
<%namespace YouHP.BLL%>
<%namespace YouHP.Utility%>
<%namespace YouHP.Model.Group%>

<script type="text/javascript" runat="server">

var query = location.href.substring(location.href.indexOf("?")); 

window.onload = function()
{
    
  var aurl = "/Pages/alpha/Group/GroupMemberAjax.aspx"+query+"&page=1";
  var myAjax=new Ajax(aurl,
  {
     method:'get',
     onComplete:function()
     {
      var html=this.response.text;
      _$("memberlist").innerHTML=html;
      }
   }
   );
   myAjax.request();
  
  
}  

function getMemberList(pageindex)
{
    
  var aurl = "/Pages/alpha/Group/GroupMemberAjax.aspx"+query+"&page="+pageindex;
  var myAjax=new Ajax(aurl,
  {
     method:'get',
     onComplete:function()
     {
      var html=this.response.text;
      _$("memberlist").innerHTML=html;
      }
   }
   );
   myAjax.request();
  
  
}  




</script>

<div class="layout13">
    
    
    <div class="col1">
      
      
      <%csharp%>TempUrl = ModuleCtrl.Header4("moduleGroupInfo","圈子资料",false,false); <%/csharp%>
      {TempUrl}
      <div class="content">
      <div class="qinfo">
        <dt class="qtitle">{GroupData.GroupName}</dt>
        <div class="qlogo">
            <img class="pic" src="{GroupData.Logo}" />
            <ul style="padding-top:5px;">
                <li>成员：{GroupData.UserNum}</li>
                <li>帖子：{GroupData.PostNum}</li>
                <li>流览：{GroupData.Hits}</li>
            </ul>
        </div>
        <table class="groupinfo">
        <%csharp%>if(GroupData.ProvinceName!=""||GroupData.CityName!=""){<%/csharp%>
        <tr><th><b>地区:</b></th><td>{GroupData.ProvinceName}&nbsp;{GroupData.CityName}</td></tr>
        <%csharp%>}<%/csharp%>
        <%csharp%>if(GroupData.Keyword!=""){<%/csharp%>
        <tr><th><b>关键词:</b></th><td>{GroupData.Keyword}</td></tr>
        <%csharp%>}<%/csharp%>
        <%csharp%>if(GroupData.Introduction!=""){<%/csharp%>
        <tr><th><b>介绍:</b></th><td>{GroupData.Introduction}</td></tr>
        <%csharp%>}<%/csharp%>
        
        
        <%csharp%>if(GroupData.JoinPermission == Constants.JoinOpen){<%/csharp%>
        <tr><th><b>加入权限:</h></td><td>加入不限制</td></tr>
        <%csharp%>}else{<%/csharp%>
        <tr><th><b>加入权限:</h></td><td>加入需声请</td></tr>
        <%csharp%>}<%/csharp%>

         <%csharp%>if(GroupData.BrowserPermission == Constants.BrowserOpen){<%/csharp%>
        <tr><th><b>浏览权限:</b></th><td>浏览不限制</td></tr>
        <%csharp%>}else{<%/csharp%>
        <tr><th><b>浏览权限:</b></th><td>只有成员能浏览</td></tr>
        <%csharp%>}<%/csharp%>
        </table>
        <div class="qgap"></div>
        <div class="qbtns">
         <%if CanJoin()%>
            <%csharp%>TempUrl = "/Group/Join.aspx?gid=" + GroupData.Id;<%/csharp%>
            <li><div class="btn-left"><div class="btn-right"><a href="{GetUrl(TempUrl)}"><span><font style="color:#43609C;">加入圈子</font></span></a></div></div></li>
         <%else%>   
            <li><div class="btn-left"><div class="btn-right"><span><font style="color:#808080;">加入圈子</font></span></div></div></li>
         <%/if%>  
         
         <%if CanAddTopic()%>
            <%csharp%>TempUrl = "/Group/TopicAdd.aspx?gid=" + GroupData.Id;<%/csharp%>
           <li><div class="btn-left"><div class="btn-right"><a href="{GetUrl(TempUrl)}"><span><font style="color:#43609C;">发表帖子</font></span></a></div></div></li>
         <%else%>  
           <li><div class="btn-left"><div class="btn-right"><span><font style="color:#808080;">发表话题</font></span></div></div></li>
         <%/if%>  
         
         <%if CanAdmin()%>
            <%csharp%>TempUrl = "/User/Group/Setting.aspx?gid=" + GroupData.Id;<%/csharp%>
            <li><div class="btn-left"><div class="btn-right"><a href="{GetUrl(TempUrl)}"><span><font style="color:#43609C;">管理圈子</font></span></a></div></div></li>
         <%else%>   
             <li><div class="btn-left"><div class="btn-right"><span><font style="color:#808080;">管理圈子</font></span></div></div></li>
         <%/if%>
         
         <%if CanInvite()%>
            <%csharp%>TempUrl = "/User/Group/InviteMember.aspx?gid=" + GroupData.Id;<%/csharp%>
            <li><div class="btn-left"><div class="btn-right"><a href="{GetUrl(TempUrl)}"><span><font style="color:#43609C;">邀请成员</font></span></a></div></div></li>
         <%else%>   
            <li><div class="btn-left"><div class="btn-right"><span><font style="color:#808080;">邀请成员</font></span></div></div></li>
         <%/if%>   
        </div>
       
      </div>
      </div>
      <%csharp%>TempUrl = ModuleCtrl.Footer("moduleGroupInfo"); <%/csharp%>
      {TempUrl}	
      
      <%csharp%>TempUrl = ModuleCtrl.Header4("moduleMaster","圈主资料",true,false); <%/csharp%>
      {TempUrl}
    
      <div class="qmaster">
       
        <div class="qlogo">
           <%csharp%>TempUrl = "/Profile/Index.aspx?uid=" + GroupMasterData.Id;<%/csharp%>
            <a href="{this.GetUrl(TempUrl)}" target="_blank"><img class="pic" src="{GroupMasterData.Avatar}" /></a>
            <dl>
                <dt class="qtitle"><a href="{this.GetUrl(TempUrl)}" target="_blank">{GroupMasterData.UserName}</a></dt>
                <table>
                <tr><td width="40px" valign="top">性别：</td><td>{GroupMasterData.Gender}</td></tr>
                <tr><td valign="top">年龄：</td><td>{GroupMasterData.Age}</td></tr> 
                <tr><td valign="top">地区：</td><td><%if GroupMasterData.Province==""&&GroupMasterData.City==""%>未知<%else%>{GroupMasterData.Province}&nbsp;{GroupMasterData.City}<%/if%></td></tr>   
                </table>         
            </dl>
   
         </div>

       
       <p>
            <%csharp%>TempUrl = "/User/FriendAdd.aspx?uid=" + GroupMasterData.Id;<%/csharp%>
              <span class="addfriend"><a href="javascript:showFriendRequestDialog('{GroupMasterData.Id}','{GroupMasterData.UserName}','{GroupMasterData.Avatar}');">加为好友</a></span>&nbsp;
            
                <%csharp%>TempUrl = "/User/PostPm.aspx?msgto=" + GroupMasterData.Id;<%/csharp%>
              <span class="sendpm"><a href="{GetUrl(TempUrl)}" target="_blank">发送消息</a></span>
        </p>
        
        </div>

       <%csharp%>TempUrl = ModuleCtrl.Footer("moduleMaster"); <%/csharp%>
       {TempUrl}	
       
       <%csharp%>TempUrl = ModuleCtrl.Header4("moduleActivestList","活跃成员",true,false); <%/csharp%>
       {TempUrl}
       
          <ul class="pictureliststyle">
                   <%csharp%>foreach(GroupUserInfo item in mGroupActivestList) { <%/csharp%>
                
                <li>
                <%csharp%>TempUrl = "/Profile/Index.aspx?uid=" + item.UserId;<%/csharp%>
                <a href="{GetUrl(TempUrl)}" class="user_img" target="_blank"><img src="{UserBLL.Instance.GetUserInfo(item.UserId).Avatar}" width="45px" height="45px" alt=""/></a>
                <p><a href="{GetUrl(TempUrl)}" target="_blank">{item.UserName}</a></p>
                </li>
                
                <%csharp%> } <%/csharp%>

          </ul>
       
       <%csharp%>TempUrl = ModuleCtrl.Footer("moduleActivestList"); <%/csharp%>
       {TempUrl}	
      
     </div>   
    
    <div class="col2">
    <%if CanAddTopic()%>
        <%csharp%> TempUrl="/Group/TopicAdd.aspx?gid="+GroupData.Id;<%/csharp%>
        <%csharp%>TempUrl = ModuleCtrl.Header7("moduleTopics","话题",this.GetUrl(TempUrl),"发表话题"); <%/csharp%>
        {TempUrl}
    <%else%>
         <%csharp%>TempUrl = ModuleCtrl.Header4("moduleTopics","话题",false,false); <%/csharp%>
        {TempUrl}
    
    <%/if%>
        <div class="qtopics">
            <div class="qhead">
             <ul>
             <%if GroupUserData.Role==1||GroupUserData.Role==2%><li class="qtopicdel">&nbsp;</li><%/if%>
                  <li class="qtitle">标题</li>
                  <li class="qhits">回复/浏览</li>
                  <li class="qpost">作者</li>
                  <li class="qlastreply">最后回复</li>
             </ul>
            </div>
             <%csharp%>
             string str="color_0";
             foreach(TopicInfo item in mTopicList) { <%/csharp%>
                <ul class="{str}">
                <%csharp%>TempUrl = "/Group/TopicDel.aspx?gid=" + GroupData.Id + "&tid=" + item.Id ; <%/csharp%>
                 <%if GroupUserData.Role==1||GroupUserData.Role==2||UserData.Id==item.PostUserId%><li class="qtopicdel"><a href="#" onclick="if(window.confirm('删除帖子将同时删除该帖子全部回复，确定删除？')) window.location.href='{this.GetUrl(TempUrl)}';">删除</a></li><%/if%>
                    <li class="qtitle">
                        <%csharp%>TempUrl = "/Group/Topic.aspx?gid=" + GroupData.Id + "&tid=" + item.Id; <%/csharp%>
                        <a href="{this.GetUrl(TempUrl)}">
                        <%csharp%>if(item.Title.Length<=25){<%/csharp%>
                        {item.Title}
                        <%csharp%>}else{ string sb=item.Title.Substring(0,25)+"....";<%/csharp%>
                        {sb}
                         <%csharp%>}<%/csharp%>
                        </a>
                    </li>
                    <li class="qhits">{item.ReplyCount}/{item.Hits}</li>
                    <li class="qpost">
                        <%csharp%>TempUrl = "/Profile/Index.aspx?uid=" + item.PostUserId; <%/csharp%>
                        <a href="{this.GetUrl(TempUrl)}"><strong>{item.PostUserName}</strong></a><br />
                        <%csharp%>TempUrl = item.PostTime.ToString("yyyy-MM-dd"); <%/csharp%>
                        {TempUrl}
                    </li>
                    <li class="qlastreply">
                    <%if item.LatestReplyId>0%>
                        <%csharp%>TempUrl = "/Profile/Index.aspx?uid=" + item.LatestReplyUserId; <%/csharp%>
                        <a href="{this.GetUrl(TempUrl)}"><strong>{item.LatestReplyUserName}</strong></a><br />
                        <%csharp%>TempUrl = item.LatestReplyTime.ToString("yyyy-MM-dd hh:mm"); <%/csharp%>
                        {TempUrl}
                    <%else%>暂无
                    <%/if%>    
                    </li>
                </ul>
            <%csharp%>
            	if(str=="color_0") str="color_1";
				else str="color_0";
            
             } <%/csharp%>
            <div class="gap15"></div>
            <div class="pages" style=" padding-right:5px; padding-bottom:5px;">{PagingString}</div>
        </div>
        
        <div class="clearBoth"></div>
 
        <%csharp%>TempUrl = ModuleCtrl.Footer("moduleTopics"); <%/csharp%>
        {TempUrl}
        
        <%csharp%>TempUrl = ModuleCtrl.Header4("moduleMembers","成员",false,false); <%/csharp%>
        {TempUrl}
        
        <p style="padding:5px 10px;"><b>管理员({GroupAdminData.Count}人)</b></p>
        
        <div class="groupmemlist">
        <ul>
        <%csharp%> foreach(GroupUserInfo info in GroupAdminData) { 
        string avatar=UserBLL.Instance.GetUserInfo(info.UserId).Avatar;  
        <%/csharp%>
        <li> 
         <%csharp%>TempUrl = "/Profile/Index.aspx?uid=" + info.UserId;<%/csharp%>   
           
         <a href="{this.GetUrl(TempUrl)}" target="_blank" class="user_img">
            <img class="pic" src="{avatar}" />
         </a>
         <br />
         <a href="{this.GetUrl(TempUrl)}">{info.UserName}</a>
        
        </li>
        <%csharp%> } <%/csharp%>
  
        </ul></div>
        <div  style="clear:both;"></div>
        
        <p style="padding:5px 10px;"><b>普通成员({MemberList.Count}人)</b></p>
        
        <div class="groupmemlist" id="memberlist">
          <div style="padding:20px 50px;">
		     <%csharp%> TempUrl = "/images/indicator_medium.gif";<%/csharp%>
		        <img src="{this.GetResource(TempUrl)}" /><b>正在加载成员列表……</b>
             
           </div>
      
        </div>

        
        <%csharp%>TempUrl = ModuleCtrl.Footer("moduleMembers"); <%/csharp%>
        {TempUrl}
        
        
    </div>
    
 
    
</div>

<div class="clearBoth"></div>  
 <div id="BOX_overlay" style="background: #000; position: absolute; z-index:100; filter:alpha(opacity=50);-moz-opacity: 0.6;opacity: 0.6;"></div>
 


<%template _footer%>